-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
prompt fiddle2 #741
prompt fiddle2 #741
Conversation
aaronvg
commented
Jul 2, 2024
- new promptfiddle files
- Add prompt fiddle project with all examples
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
typescript/fiddle-frontend/public/_examples/all-projects/main.py
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
- Added new prompt fiddle files and examples in
/typescript/fiddle-frontend/public/_examples/all-projects/
- Updated
integ-tests/baml_src/fiddle-examples/images/image.baml
with newDescribeImage2
function - Enhanced
typescript/fiddle-frontend/app/[project_id]/_components/CodeMirrorEditor.tsx
with hyperlink functionality - Modified
typescript/fiddle-frontend/app/[project_id]/_components/ExploreProjects.tsx
to remove example project loading - Updated project loading logic in
typescript/fiddle-frontend/lib/loadProject.ts
27 file(s) reviewed, 5 comment(s)
Edit PR Review Bot Settings
export const ExploreProjects = () => { | ||
const [projectGroups, setProjectGroups] = useState<BamlProjectsGroupings | null>(null) | ||
|
||
useEffect(() => { | ||
const fetchProjects = async () => { | ||
const projects = await loadExampleProjects() | ||
setProjectGroups(projects) | ||
} | ||
fetchProjects() | ||
}, []) | ||
|
||
return ( | ||
<div className='flex flex-col w-full h-full'> | ||
<SheetHeader> | ||
<SheetTitle className='text-2xl'>Prompt Fiddle Examples</SheetTitle> | ||
<SheetDescription className='text-base'> | ||
Prompt Fiddle uses BAML -- a configuration language for LLM functions. Here are some example projects to get | ||
you started. | ||
</SheetDescription> | ||
</SheetHeader> | ||
|
||
<div className='overflow-y-auto'> | ||
{projectGroups ? ( | ||
<div className='flex flex-col gap-y-4'> | ||
<ExampleCarousel title='Intros' projects={projectGroups.intros} /> | ||
{/* <ExampleCarousel title="Advanced Prompt Syntax" projects={projectGroups.advancedPromptSyntax} /> */} | ||
<ExampleCarousel title='Prompt Engineering' projects={projectGroups.promptEngineering} /> | ||
</div> | ||
) : ( | ||
<div>Loading...</div> | ||
)} | ||
</div> | ||
</div> | ||
) | ||
return null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧠 logic: Returning null here removes the entire functionality of loading and displaying example projects.
args { | ||
message { | ||
userName "Alice" | ||
message "I can't access my account using my login credentials. I havent received the promised reset password email. Please help." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📚 spelling: Typo in the test message: 'havent' should be 'haven't'.
@@ -0,0 +1,17 @@ | |||
// You can use the fallback provider to add more resilliancy to your application. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
📚 spelling: Typo in 'resilliancy'. Correct spelling is 'resiliency'.
typescript/fiddle-frontend/public/_examples/all-projects/baml_src/multi-modal/audio-input.baml
Outdated
Show resolved
Hide resolved
typescript/fiddle-frontend/public/_examples/all-projects/baml_src/multi-modal/image-input.baml
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
- Minor comment corrections in
typescript/fiddle-frontend/public/_examples/all-projects/baml_src/multi-modal/audio-input.baml
- Added
AudioInput
function to process audio input - Included
TestURLAudioInput
test case forAudioInput
function - Minor comment corrections in
typescript/fiddle-frontend/public/_examples/all-projects/baml_src/multi-modal/image-input.baml
- Added
DescribeImage
function andImageTest
test case for image description
2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings